package com.swu.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Schema(description = "病案详情VO")
public class MedicalRecordVO {
    
    @Schema(description = "患者信息")
    private PatientInfoVO patientInfo;
    
    @Schema(description = "住院信息")
    private AdmissionInfoVO admissionInfo;
    
    @Schema(description = "诊断信息")
    private DiagnosisInfoVO diagnosisInfo;
    
    @Schema(description = "医疗团队")
    private MedicalTeamVO medicalTeam;
    
    @Data
    @Schema(description = "患者基本信息")
    public static class PatientInfoVO {
        @Schema(description = "病案号")
        private String medicalRecordId;
        
        @Schema(description = "姓名")
        private String name;
        
        @Schema(description = "性别")
        private String gender;
        
        @Schema(description = "年龄")
        private Integer age;
        
        @Schema(description = "证件号码")
        private String idNumber;
    }
    
    @Data
    @Schema(description = "住院信息")
    public static class AdmissionInfoVO {
        @Schema(description = "住院标识")
        private Integer admissionId;
        
        @Schema(description = "入院时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime admissionTime;
        
        @Schema(description = "入院科别")
        private String admissionDept;
        
        @Schema(description = "实际住院天数")
        private Integer actualDays;
    }
    
    @Data
    @Schema(description = "诊断信息")
    public static class DiagnosisInfoVO {
        @Schema(description = "主要诊断")
        private String mainDiagnosis;
        
        @Schema(description = "主要诊断编码")
        private String mainDiagCode;
    }
    
    @Data
    @Schema(description = "医疗团队信息")
    public static class MedicalTeamVO {
        @Schema(description = "质控等级：1-甲，2-乙，3-丙")
        private Integer qualityGrade;
        
        @Schema(description = "质控日期")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime qcDate;
    }
} 